Optimal. Leaf size=76 \[ -\frac {(A b-a C) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}}-\frac {A}{a x}-\frac {(b B-a D) \log \left (a+b x^2\right )}{2 a b}+\frac {B \log (x)}{a} \]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {1802, 635, 205, 260} \begin {gather*} -\frac {(A b-a C) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}}-\frac {A}{a x}-\frac {(b B-a D) \log \left (a+b x^2\right )}{2 a b}+\frac {B \log (x)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 260
Rule 635
Rule 1802
Rubi steps
\begin {align*} \int \frac {A+B x+C x^2+D x^3}{x^2 \left (a+b x^2\right )} \, dx &=\int \left (\frac {A}{a x^2}+\frac {B}{a x}+\frac {-A b+a C-(b B-a D) x}{a \left (a+b x^2\right )}\right ) \, dx\\ &=-\frac {A}{a x}+\frac {B \log (x)}{a}+\frac {\int \frac {-A b+a C-(b B-a D) x}{a+b x^2} \, dx}{a}\\ &=-\frac {A}{a x}+\frac {B \log (x)}{a}+\frac {(-A b+a C) \int \frac {1}{a+b x^2} \, dx}{a}+\frac {(-b B+a D) \int \frac {x}{a+b x^2} \, dx}{a}\\ &=-\frac {A}{a x}-\frac {(A b-a C) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}}+\frac {B \log (x)}{a}-\frac {(b B-a D) \log \left (a+b x^2\right )}{2 a b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 75, normalized size = 0.99 \begin {gather*} \frac {(a C-A b) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{a^{3/2} \sqrt {b}}-\frac {A}{a x}+\frac {(a D-b B) \log \left (a+b x^2\right )}{2 a b}+\frac {B \log (x)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A+B x+C x^2+D x^3}{x^2 \left (a+b x^2\right )} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.77, size = 165, normalized size = 2.17 \begin {gather*} \left [\frac {2 \, B a b x \log \relax (x) + {\left (C a - A b\right )} \sqrt {-a b} x \log \left (\frac {b x^{2} + 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) - 2 \, A a b + {\left (D a^{2} - B a b\right )} x \log \left (b x^{2} + a\right )}{2 \, a^{2} b x}, \frac {2 \, B a b x \log \relax (x) + 2 \, {\left (C a - A b\right )} \sqrt {a b} x \arctan \left (\frac {\sqrt {a b} x}{a}\right ) - 2 \, A a b + {\left (D a^{2} - B a b\right )} x \log \left (b x^{2} + a\right )}{2 \, a^{2} b x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.38, size = 68, normalized size = 0.89 \begin {gather*} \frac {B \log \left ({\left | x \right |}\right )}{a} + \frac {{\left (C a - A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a} + \frac {{\left (D a - B b\right )} \log \left (b x^{2} + a\right )}{2 \, a b} - \frac {A}{a x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 83, normalized size = 1.09 \begin {gather*} -\frac {A b \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}\, a}+\frac {C \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}}+\frac {B \ln \relax (x )}{a}-\frac {B \ln \left (b \,x^{2}+a \right )}{2 a}+\frac {D \ln \left (b \,x^{2}+a \right )}{2 b}-\frac {A}{a x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 3.00, size = 67, normalized size = 0.88 \begin {gather*} \frac {B \log \relax (x)}{a} + \frac {{\left (C a - A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b} a} + \frac {{\left (D a - B b\right )} \log \left (b x^{2} + a\right )}{2 \, a b} - \frac {A}{a x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.21, size = 78, normalized size = 1.03 \begin {gather*} \frac {\ln \left (b\,x^2+a\right )\,D}{2\,b}-\frac {A}{a\,x}-\frac {B\,\left (\ln \left (b\,x^2+a\right )-2\,\ln \relax (x)\right )}{2\,a}-\frac {A\,\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{a^{3/2}}+\frac {C\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{\sqrt {a}\,\sqrt {b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________